<extend file='resource/admin/base'/>
<block name="content">
	<!-- TAB NAVIGATION -->
	<ul class="nav nav-tabs" role="tablist">
<!--		<li class="active"><a href="#tab1" role="tab" data-toggle="tab">栏目首页</a></li>-->
        <li class="active"><a href="{{u('index')}}">文章首页</a></li>
        <li><a href="{{u('post')}}">文章添加</a></li>
	</ul>
	<!-- TAB CONTENT -->
    <table class="table table-hover">
        <thead>
        <tr>
            <th width="8%">编号</th>
            <th>文章标题</th>
            <th>文章作者</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>

        <foreach from="$field" value="$d">
            <tr>
                <td>{{$d['arc_id']}}</td>
                <td>{{$d['arc_title']}}</td>
                <td>{{$d['arc_author']}}</td>
                <td>
                    <div class="btn-group btn-group-sm">
                        <a href="/{{$d['arc_id']}}.html" class="btn btn-primary">文章预览</a>
                        <a href="{{u('post',['arc_id'=>$d['arc_id']])}}" class="btn btn-success">编辑</a>
                        <a href="javascript:" class="btn btn-danger" onclick="remove({{$d['arc_id']}})">删除</a>
                    </div>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    {{$field->links()}}
    <script>
        function remove(arc_id) {
            util.confirm('确定删除吗?',function(res){
                location.href = "{{u('remove')}}&arc_id=" + arc_id;
            })
        }
    </script>
</block>